package com.huawei.appmarket.service.substance;

import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;
import o.fpi;

public class BlurFlowBackground extends RelativeLayout {
    private fpi ॱ;

    public BlurFlowBackground(Context context) {
        super(context);
    }

    public BlurFlowBackground(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
    }

    public BlurFlowBackground(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
    }

    public void setHwBlurEngine(fpi o_fpi) {
        this.ॱ = o_fpi;
    }

    public void setBlurEnabled(boolean z) {
        if (this.ॱ != null) {
            this.ॱ.ˏ(z);
            this.ॱ.ॱ(this, getVisibility() == 0, true);
        }
    }

    public void draw(Canvas canvas) {
        if (this.ॱ == null || !this.ॱ.ˋ()) {
            super.draw(canvas);
            return;
        }
        this.ॱ.ˏ(canvas, (View) this);
        super.dispatchDraw(canvas);
    }

    protected void onWindowVisibilityChanged(int i) {
        super.onWindowVisibilityChanged(i);
        if (this.ॱ != null) {
            this.ॱ.ॱ(this, getVisibility() == 0, true);
        }
    }
}
